<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="http://mat1.gtimg.com/libs/jquery2/2.2.0/jquery.js"></script>

</head>
<body>
欢迎{{ request.session.name }}登录
<table border=1px>
    <tr>
        <td><a href="{% url 'add' %}">增加</a></td>
    </tr>
    {% for all in alls %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ all.tit }}</td>
            <td>{{ all.ath }}</td>
            <td>{{ all.cont }}</td>
            <td>{{ all.dataa|date:'Y-m-d' }}</td>
            <td>
                {% if all.ss == 1 %}
                    已审核
                {% else %}
                    未审核
                {% endif %}
            </td>
            <td>{{ all.Type.tname }}</td>
            <td><a href="{% url 'delete' id=all.id %}" onclick="a()">删除</a></td>
            <td><a href="{% url 'update' id=all.id sid=all.Type.id %}">修改</a></td>
        </tr>
    {% endfor %}

</table>
<script>
    function a(){
        alert('删除成功')
    }
</script>
</body>
</html>